Checks if a particular sample format is supported by a device.
| DWORD BASS_WASAPI_CheckFormat( int device, DWORD freq, DWORD chans, DWORD flags ); |
Parameters
| device | The device to use... -1 = default output device, -2 = default input device. BASS_WASAPI_GetDeviceInfo can be used to enumerate the available devices. | ||
| freq | The sample rate. | ||
| chans | The number of channels... 1 = mono, 2 = stereo, etc. | ||
| flags | Any combination of these flags.
|
Return value
If the sample format is supported, the maximum supported resolution (a BASS_WASAPI_FORMAT value) is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
Error codes
| BASS_ERROR_WASAPI | WASAPI is not available. |
| BASS_ERROR_DEVICE | device is invalid. |
| BASS_ERROR_DRIVER | The driver could not be initialized. |
| BASS_ERROR_FORMAT | The specified format is not supported by the device. |
Remarks
Shared and exclusive modes may have different sample formats available. Only the "mix format" (available from BASS_WASAPI_GetDeviceInfo) is generally supported in shared mode.
See also
BASS_WASAPI_Init